﻿@namespace CyssBlazor.Shared.Components
@inherits InputFileBase

@if (ShowLabel)
{

    <label class="form-label" for="@Id">@DisplayText</label>

}
<div class="form-group-input" style="width:100%">
    <div class="input-group">
        <a href="http://localhost:55151/Download/GetFileById?Id=@this.Value" class="form-control">@FileName</a>
        <div class="input-group-append">
            @if (IsDisabled)
            {
                <button type="button" @onclick="Select" class="@ClassName" role="button" disabled="disabled">
                    <i class="fa fa-folder-open-o"></i><span><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">浏览</font></font></span>
                </button>
            }
            else
            {
                <button type="button" @onclick="Select" class="@ClassName" role="button">
                    <i class="fa fa-folder-open-o"></i><span><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">浏览</font></font></span>
                </button>
            }
        </div>
        <div style="display:none">

            @if (IsMultiple)
            {

                <InputFile id="@Id" @ref="inputFile" accept="@AllowFileType" OnChange="OnInputFileChange" multiple />
            }
            else
            {
                <InputFile id="@Id" @ref="inputFile" accept="@AllowFileType" OnChange="OnInputFileChange" />
            }

        </div>
    </div>

</div>

